//
//  MWGoodsDetailsAttrCell.m
//  XiRan-iOS
//
//  Created by liuyiming on 2019/12/2.
//  Copyright © 2019 Wood. All rights reserved.
//

#import "MWGoodsDetailsAttrCell.h"

@interface MWGoodsDetailsAttrCell ()

@property(nonatomic, strong) UILabel *titleLB;
@property(nonatomic, strong) UIView *lineView;

@end

@implementation MWGoodsDetailsAttrCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setupPageSubviews];
        return self;
    }
    return self;
}

- (void)setTitle:(NSString *)title {
    _titleLB.text = title;
}

- (void)setupPageSubviews {
    _titleLB = [[UILabel alloc] init];
    _titleLB.font = MWFont(14);
    _titleLB.textColor = MWHexColor(@"#666666");
    [self.contentView addSubview:_titleLB];
    
    _lineView = [[UIView alloc] init];
    _lineView.backgroundColor = MWHexColor(@"#D8D8D8");
    [self.contentView addSubview:_lineView];
    
    [_titleLB mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView).offset(16);
        make.left.equalTo(self.contentView).offset(16);
        make.right.equalTo(self.contentView).offset(-16);
        make.bottom.equalTo(self.contentView).offset(-16);
    }];
    
    [_lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.contentView).offset(16);
        make.right.equalTo(self.contentView).offset(-16);
        make.height.equalTo(@0.5);
        make.bottom.equalTo(self.contentView);
    }];
}

@end
